import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import index from '@/components/index'
import Install from '@/components/Install'
import Detailed from '@/components/Detailed'
import User from '@/components/User'
import apply from '@/components/apply'
import applyRole from '@/components/applyRole'
import area from '@/components/area'
import light from '@/components/light'
import deng from '@/components/deng'
import environment from '@/components/environment'
import dengsimple from '@/components/dengsimple'
import ensimple from '@/components/ensimple'
import lightForm from '@/components/lightForm'
import map from '@/components/map'
import Polling from '@/components/Polling'
import dengForm from '@/components/dengForm'
import enForm from '@/components/enForm'
import videoForm from '@/components/videoForm'
import sosForm from '@/components/sosForm'
import broadcastForm from '@/components/broadcastForm'
import wifiForm from '@/components/wifiForm'
import screenForm from '@/components/screenForm'
import signalForm from '@/components/signalForm'

Vue.use(Router)


export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children:[
        {
          path: '/User',
          name: 'User',
          component: User
        },
        {
          path: '/light',
          name: 'light',
          component: light
        },
        {
          path: '/deng',
          name: 'deng',
          component: deng,
        },
        { 
          path: '/Polling',
          name: 'Polling',
          component: Polling
        },
        { 
          path: '/environment',
          name: 'environment',
          component: environment
        },
        { 
          path: '/dengsimple',
          name: 'dengsimple',
          component: dengsimple
        },
        { 
          path: '/ensimple',
          name: 'ensimple',
          component: ensimple
        },
        { 
          path: '/lightForm',
          name: 'lightForm',
          component: lightForm
        },
        { 
          path: '/dengForm',
          name: 'dengForm',
          component: dengForm
        },
        { 
          path: '/enForm',
          name: 'enForm',
          component: enForm
        },
        { 
          path: '/videoForm',
          name: 'videoForm',
          component: videoForm
        },
        { 
          path: '/sosForm',
          name: 'sosForm',
          component: sosForm
        },
        { 
          path: '/broadcastForm',
          name: 'broadcastForm',
          component: broadcastForm
        },
        { 
          path: '/wifiForm',
          name: 'wifiForm',
          component: wifiForm
        },
        { 
          path: '/screenForm',
          name: 'screenForm',
          component: screenForm
        },
        { 
          path: '/signalForm',
          name: 'signalForm',
          component: signalForm
        },
        { 
          path: '/map',
          name: 'map',
          component: map,
        },
        {
          path: '/install',
          name: 'Install',
          component: Install
        },
        {
          path: '/detailed',
          name: 'Detailed',
          component: Detailed
        },
        { 
          path: '/applyRole',
          name: 'applyRole',
          component: applyRole
        },
        { 
          path: '/area',
          name: 'area',
          component: area
        },
      
        
      ]
    },
    {
      path: '/apply',
      name: 'apply',
      component: apply
    },
   
  ]
})
